


//declare var wx: any;
import { tt_impl } from "./ttapi_impl_wegame/ttimpl_wx"
import { tt } from "./ttapi_interface/ttapi.js"
import * as tt2 from "./ttapi_layer2/ttlayer2.js";
import * as tt2test from "./ttapi_layer2_test/layer2_test.js";


export class App {

    //此处的CommonData是Test中的不太好

    async Start(): Promise<void> {

        //首先 初始化 TTEngine ，TTEngine 是一套极简的渲染引擎
        let impl = new tt_impl.ttimpl_wx();
        impl.Init();

        let userdata = new UserData();

        tt2test.Test_UITool.InitResPath("code/ttapi_layer2_test/data");
        let deffonturl = tt2test.Test_UITool.getDefaultFontResPath();
        console.log("====font="+deffonturl);
        let debug = true;

        let app = new tt2.QFrame_App<UserData>(userdata, deffonturl, debug);

        await app.Start();

        app.ChangeState(new tt2test.State_TestAll());
    }


}
export class UserData {

}